import React,{useEffect} from 'react';
import {
    View, StyleSheet,
    TouchableWithoutFeedback,
    Image,
    Text
} from 'react-native';
import {directToPage} from '../../utils/ext';


const SwiperItem = (props) => { 

    const {data, styles, navigation} = props;

    return (
        <TouchableWithoutFeedback
            styles={styles.swiperSize}
            onPress={()=>directToPage(navigation, 'Detail', {courseId:data.course_id})}
        >
            <Image
                style={styles.swiperSize}
                source={{uri:data.img}}
            />
        </TouchableWithoutFeedback>
        
    );
}

export default SwiperItem;
